import { ApiProperty } from "@nestjs/swagger";
import { IsString, IsNotEmpty } from "class-validator";

export class LoginUser {
    @ApiProperty({
        description: "账号",
        example: "qqq",
        required: true
    })
    @IsString({ message: "username 类型错误" })
    @IsNotEmpty({ message: "账号不能为空" })
    readonly username: string;
    
    @ApiProperty({
        description: "密码",
        example: "111111",
        required: true
    })
    @IsString({ message: "password 类型错误" })
    @IsNotEmpty({ message: "密码不能为空" })
    readonly password: string;
}
